<span page-title ng-model="contentCredential">{{ 'Repositories for ' | translate }} {{ contentCredential.name }}</span>

<div data-extend-template="layouts/partials/table.html">
  <span data-block="no-rows-message" translate>
    You currently don't have any Products associated with this Content Credential.
  </span>

  <div data-block="search">
    <input type="text" class="form-control" stop-event="click"
            placeholder="{{ 'Filter...' | translate }}"
            ng-model="contentCredentialProductFilter"/>
  </div>


  <div data-block="table">
    <table bst-table="table" class="table table-striped table-bordered">
      <thead>
        <tr bst-table-head>
          <th bst-table-column="name" sortable><span translate>Name</span></th>
          <th bst-table-column="usedAs" sortable><span translate>Used as</span></th>
          <th bst-table-column class="number-cell" translate>Repositories</th>
        </tr>
      </thead>

      <tbody>
        <tr bst-table-row ng-repeat="product in table.rows | filter:contentCredentialProductFilter">
          <td bst-table-cell>
            <a ui-sref="product.info({productId: product.id})">
              {{ product.name }}
            </a>
          </td>
          <td bst-table-cell>
              {{ product.usedAs }}
          </td>
          <td bst-table-cell class="number-cell">
            <a ui-sref="product.repositories({productId: product.id})">
              {{ product.repository_count }}
            </a>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>
